<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * App\OrderAddress
 *
 * @property int $id 地址标识
 * @property int $user_id 用户标识
 * @property string $consignee 收件人
 * @property string $province 省份
 * @property string $city 城市
 * @property string $area 地区
 * @property string $address 详细地址
 * @property string $postcode 邮政编码
 * @property string|null $phone 手机号
 * @property \Illuminate\Support\Carbon|null $deleted_at
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static bool|null forceDelete()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress newQuery()
 * @method static \Illuminate\Database\Query\Builder|\App\OrderAddress onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress query()
 * @method static bool|null restore()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereAddress($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereArea($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereCity($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereConsignee($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress wherePhone($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress wherePostcode($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereProvince($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereUserId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\OrderAddress withTrashed()
 * @method static \Illuminate\Database\Query\Builder|\App\OrderAddress withoutTrashed()
 * @mixin \Eloquent
 * @property string|null $telephone 固定电话号码
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereTelephone($value)
 * @property string $lng 经度
 * @property string $lat 纬度
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereLat($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereLng($value)
 * @property int $floor 楼层
 * @property int $has_lift 是否有电梯
 * @property int $type 地址类型，0收货地址，1配送地址
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereFloor($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereHasLift($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderAddress whereType($value)
 */
class OrderAddress extends Model
{
    protected $table='order_address';
    use SoftDeletes;

    public static function getAddressInfo($order_address_id){
        $data=self::whereId($order_address_id)->first();
        return $data ?? [];
    }
}
